home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / ShangaiDynasty.swf / scripts / DefineButton2_31 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2005-08-05  |  854 b   |  34 lines

  1. on(press){
  2.    checknum = eval("/control:checknum");
  3.    num = _name.substr("6","-1");
  4.    erasing = eval("/control:erasing");
  5.    if(enable >= "1")
  6.    {
  7.       if(erasing != "1")
  8.       {
  9.          while("31" >= numall)
  10.          {
  11.             numall += "1";
  12.             tellTarget("/brick" add numall)
  13.             {
  14.                gotoAndStop(1);
  15.             }
  16.          }
  17.          numall = "0";
  18.          if(eval("face:face") == eval("/control:checkface"))
  19.          {
  20.             tellTarget("/brick" add checknum)
  21.             {
  22.                click = "0";
  23.                gotoAndPlay(3);
  24.             }
  25.             setProperty("/shadow" add checknum, _visible, "0");
  26.             setProperty("/shadow" add num, _visible, "0");
  27.             click = "1";
  28.             gotoAndPlay(3);
  29.          }
  30.          gotoAndStop(2);
  31.       }
  32.    }
  33. }
  34.